package com.morpheus.zookeeper.api.election;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.leader.LeaderSelectorListener;
import org.apache.curator.framework.state.ConnectionState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CuratorLeaderElectionListener implements LeaderSelectorListener {
	private static final Logger LOGGER = LoggerFactory.getLogger(CuratorLeaderElectionListener.class);

	public CuratorLeaderElectionListener() {
	}

	@Override
	public void stateChanged(CuratorFramework curatorFramework, ConnectionState connectionState) {
		switch (connectionState) {
		case CONNECTED:

			break;
		case LOST:

			break;
		case RECONNECTED:

			break;
		default:
			break;
		}
	}

	@Override
	public void takeLeadership(CuratorFramework curatorFramework) throws Exception {
		
	}
}
